<form name="form1" id="form-memo" method="POST" action="index.php?app=ome&ctl=admin_delivery&act=doReback">
<div style="text-align:center;">
<!--<{button label="打回发货单" type="button" id="return_delivery"}></div>-->
<div id="returnmemo">
<div class="division">
<table width="100%">
    <tr>
        <th><{t}>备注：<{/t}></th>
        <td colspan="3">
            <textarea name="memo" id="memo"  cols="40" rows="5" value='' vtype="required"></textarea></td>
    </tr>
    <tr>
        <td></td>
        <td>
            <span>撤销当前发货单后订单的确认状态将随之改变</span></td>
    </tr>
</table>
</div>

<table cellspacing="0" cellpadding="0" border="0" align="center" class="tableAction">
    <tr>
        <td align="center"><{button label="提交" type="submit" id="btn-submit" onclick="javascript:void(0)"}></td>
    </tr>
</table>
</div>
<input type='hidden' name='delivery_id' value='<{$delivery_id}>'>
<{if !empty($ids)}>
<strong class="action-bar-info">子发货单信息:</strong>
<strong class="action-bar-info">(注意：此子发货单列表为本大发货单包含的所有子发货单，选择全部或者只留一个，本张大发货单将消失，并撤销所有已选择的子发货单)</strong><hr>
<input type='hidden' name='returnids' value='<{$returnids}>'>
<input type='hidden' name='flag' value='OK'>
<div class="division">
<table width="100%">
<tr>
<td align="left">发货单号:</td>
<td align="left">操作:</td>
</tr>
<{foreach from=$ids item=item}>
<tr>
<td align="left"><{$idd[$item]}></td>
<td align="left"><input type="checkbox" name="id[]" value="<{$item}>"/></td>
</tr>
<{/foreach}>
</table>
</div>
<{/if}>

</form>
<script>
(function(){
	var _form = $('form-memo');
	var btn = $('btn-submit');
	//var finder = finderGroup['<{$env.get.finder_id}>'];
	_form.store('target',{
	onComplete:function(){
		try{
			var _dialogIns = btn.getParent('.dialog').retrieve('instance');
			//console.info(btn,_dialogIns);
		 }catch(e){}
		if(_dialogIns){
			_dialogIns.close();
			//finder.refresh.delay(400,finder);
		}   
	}
	});
/*   $('return_delivery').addEvent('click',function(){-->
        $('returnmemo').show();
        $('memo').disabled = false;
        btn.disabled = false;
    })-->
*/
})()
</script>

